<?php 
$sf_user = empty($sf_user) ? sfContext::getInstance()->getUser() : $sf_user;
?>
<?php if($notice = $sf_user->getFlash('notice')){?>
<div class="notice"><?php echo $notice?></div>
<?php }elseif($error = $sf_user->getFlash('error')){?>
<div class="error"><?php echo $error?></div>
<?php }?>